@extends('admin.common.web')

@section('title','配置项管理')

@section('content')
<!-- Page Content -->
    <!-- Page Breadcrumb -->
    <div class="page-breadcrumbs">
        <ul class="breadcrumb">
            <li>
                <a href="#">系统</a>
            </li>
            <li>
                <a href="#">配置项管理</a>
            </li>
        </ul>
    </div>
    <!-- /Page Breadcrumb -->
    <!-- Page Body -->
    <div class="page-body">
        <div id="horizontal-form">
            @include('admin.common.msg')
            @include('admin.common.error')
            <form class="form-horizontal" action="{{ route('admin.web_config.store') }}" enctype="multipart/form-data" method="post">
                <div class="tabbable">
                    <ul class="nav nav-tabs" id="myTab">
                        <li class="active">
                            <a data-toggle="tab" href="#home">
                                基本信息
                            </a>
                        </li>

                        {{--<li class="tab-red">
                            <a data-toggle="tab" href="#profile">
                                文章标签
                            </a>
                        </li>--}}
                    </ul>

                    <div class="tab-content">
                        <div id="home" class="tab-pane in active">
                            @csrf
                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">网站主标题</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('site_title',$site_info['site_title']) }}" name="site_title" required type="text">
                                </div>
                                @if($errors->has('site_title'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('site_title') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">网站副标题</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('site_second_title',$site_info['site_second_title']) }}" name="site_second_title" required type="text">
                                </div>
                                @if($errors->has('site_second_title'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('site_second_title') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">网站关键词</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('keywords',$site_info['keywords']) }}" name="keywords" required type="text">
                                </div>
                                @if($errors->has('keywords'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('keywords') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">网站描述</label>
                                <div class="col-sm-6">
                                       <textarea name="site_desc" cols="82" rows="3">{{ old('site_desc',$site_info['site_desc']) }}</textarea>
                                </div>
                                @if($errors->has('site_desc'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('site_desc') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">* 必填</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">网站logo</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('thumb',$site_info['thumb']) }}" name="thumb" type="file">
                                </div>

                                @if($errors->has('thumb'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('thumb') }}</p>
                                @else
                                    @if($site_info['thumb'])
                                        <img src="{{ asset($site_info['thumb']) }}" alt="" width="30" height="30"/>
                                    @else
                                        <p class="help-block col-sm-4 red">* 必填</p>
                                    @endif
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="group_id" class="col-sm-2 control-label no-padding-right">网站状态</label>
                                <div class="col-sm-6">
                                    <select name="site_status" style="width: 100%;">
                                        <option  @if($site_info['site_status'] == 1) selected @endif value="1">开启</option>
                                        <option  @if($site_info['site_status'] == 0) selected @endif value="0">关闭</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="group_id" class="col-sm-2 control-label no-padding-right">开放注册</label>
                                <div class="col-sm-6">
                                    <select name="reg_status" style="width: 100%;">
                                        <option @if($site_info['reg_status'] == 1) selected @endif value="1">开启</option>
                                        <option @if($site_info['reg_status'] == 0) selected @endif value="0">关闭</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="group_id" class="col-sm-2 control-label no-padding-right">后台验证码登录</label>
                                <div class="col-sm-6">
                                    <select name="open_admin_captcha" style="width: 100%;">
                                        <option @if($site_info['open_admin_captcha'] == 1) selected @endif value="1">开启</option>
                                        <option @if($site_info['open_admin_captcha'] == 0) selected @endif value="0">关闭</option>
                                    </select>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">电子邮箱</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('email',$site_info['email']) }}" name="email" required type="text">
                                </div>
                                @if($errors->has('email'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('email') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">网站邮箱</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">上传文件大小</label>
                                <div class="col-sm-6">
                                    <input class="form-control" value="{{ old('upload_file_size',$site_info['upload_file_size']) }}" name="upload_file_size" required type="text">
                                </div>
                                @if($errors->has('upload_file_size'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('upload_file_size') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red">MB</p>
                                @endif
                            </div>

                            <div class="form-group">
                                <label for="username" class="col-sm-2 control-label no-padding-right">统计代码</label>
                                <div class="col-sm-6">
                                    <textarea name="site_count_code" cols="82" rows="3">{{ old('site_count_code',$site_info['site_count_code']) }}</textarea>
                                </div>
                                @if($errors->has('site_count_code'))
                                    <p class="help-block col-sm-4 blue">{{ $errors->first('site_count_code') }}</p>
                                @else
                                    <p class="help-block col-sm-4 red"></p>
                                @endif
                            </div>
                        </div>

                        {{--<div id="profile" class="tab-pane">
                            <div class="form-group">
                                <label for="is_show" class="col-sm-2 control-label no-padding-right">文章标签</label>
                                <div class="col-xs-4">
                                    <label>
                                        <textarea name="tags" cols="60" rows="5" placeholder="多个标签用英文 , 号隔开"></textarea>
                                    </label>
                                </div>
                            </div>
                        </div>--}}

                        <div class="form-group">
                            <div class="col-sm-offset-2 col-sm-10">
                                <button type="submit" class="btn btn-info">保存信息</button>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="horizontal-space"></div>

            </form>
        </div>

        {{--<div class="row">
            <div class="col-lg-12 col-sm-12 col-xs-12">
                <div class="widget">
                    <div class="widget-header bordered-bottom bordered-blue">
                        <span class="widget-caption">新增文章</span>
                    </div>
                    <div class="widget-body">

                    </div>
                </div>
            </div>
        </div>--}}

    </div>

    <!-- /Page Body -->
@endsection
